<?php
/**
 * Created by PhpStorm.
 * User: xiao
 * Date: 2017/6/13
 * Time: 下午2:03
 */

namespace app\src\invite\action;


use app\src\base\action\BaseAction;
use app\src\invite\logic\InviteCodeLogic;

class InviteCodeAction extends BaseAction
{
    /**
     * 验证邀请码
     * @param $invite_code
     * @return array
     */
    public function check($invite_code)
    {
        return (new InviteCodeLogic)->check($invite_code);
    }

    /**
     * 创建邀请码
     * @param $type
     * @param $account_id
     * @return array
     */
    public function create($type, $account_id)
    {
        return (new InviteCodeLogic)->create($type, $account_id);
    }

    /**
     * 获取邀请码
     * @param $type
     * @param $account_id
     * @return array
     */
    public function getInviteCode($type, $account_id)
    {
        return (new InviteCodeLogic)->getInviteCode($type, $account_id);
    }
}